import os


class Functions:
    # 私有方法，用于生成图标或图像的路径
    def __get_icon_path(folder, icon_name):
        app_path = os.path.abspath(os.getcwd())
        path = os.path.join(app_path, folder)
        return os.path.normpath(os.path.join(path, icon_name))

    # 设置svg类型的icon
    def set_svg_icon(icon_name):
        return Functions.__get_icon_path("res/SYS/images/svg_icons/", icon_name)

    # 设置svg类型的image
    def set_svg_image(icon_name):
        return Functions.__get_icon_path("res/SYS/images/svg_images/", icon_name)

    # 设置png类型的image
    def set_png_image(icon_name):
        return Functions.__get_icon_path("res/SYS/images/png_images/", icon_name)

    # 设置ico
    def set_ico(icon_name):
        return Functions.__get_icon_path("res/SYS/images/ico/", icon_name)
